<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <script type="text/JavaScript">
              /*
                  对于成绩大于60分的,输出合格,地域60分的,输出'不合格'
              */
      /*        var score =prompt("输入成绩");
                  switch (true) {
                      case score >= 60:
                              alert("合格");
                          break;
                      default:
                              alert("不合格");
                          break;
                  }

       */
                    var score =prompt("输入成绩");

                         switch (parseInt(score/10)) {
                      case 10:
                      case 9:
                      case 8:
                      case 7:
                      case 6:
                              alert("合格");
                          break;
                      default:
                              alert("不合格");
                          break;
                  }
    </script>
  </head>
  <body></body>
</html>
